﻿/**
<code>
  <author name="Zealic" email="zealic(at)gmail.com" type="Creator"/>
</code>
**/
using System;
using System.IO;

namespace Zealib.Resources
{
    public static class ResourceExtensions
    {
        public static TextReader AsTextReader(this IResource resource)
        {
            if(resource == null) throw new ArgumentNullException("resource");
            Stream stream = resource.GetStream();
            return new StreamReader(stream);
        }

    }
}
